{template 'common/header'}
<div class="we7-page-title">站点设置</div>
<ul class="we7-page-tab">
	<li{if $do == 'copyright'} class="active"{/if}><a href="{php echo url('system/site');}">站点信息</a></li>
</ul>
<div class="clearfix">
	<form action="" method="post"  class="we7-form" role="form" enctype="multipart/form-data" id="form1">
		<div class="form-group">
			<label class="col-sm-2 control-label" style="text-align:left;">关闭站点</label>
			<div class="col-sm-8 form-control-static">
				<input type="radio" name="status" id="status-1" {if $settings['status'] == 1} checked="checked" {/if} value="1" />
				<label class="radio-inline" for="status-1">
					是
				</label>
				<input type="radio" name="status" id="status-0" {if $settings['status'] == 0} checked="checked" {/if} value="0" />
				<label class="radio-inline" for="status-0">
					否
				</label>
			</div>
		</div>
		<div class="form-group reason" {if $settings['status'] == 0} style="display:none;" {/if}>
		<label class="col-sm-2 control-label" style="text-align:left;">关闭原因</label>
		<div class="col-sm-8">
			<textarea style="height:150px;" class="form-control" cols="70" name="reason" autocomplete="off">{$settings['reason']}</textarea>
			<input type="hidden" name="reasons" value="{$settings['reason']}">
		</div>
</div>
<h5 class="page-header">登录站点</h5>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">是否开启验证码</label>
	<div class="col-sm-8 form-control-static">
		<input type="radio" id="verifycode-1" name="verifycode" {if $settings['verifycode'] == 1} checked="checked" {/if} value="1" />
		<label class="radio-inline" for="verifycode-1">
			是
		</label>
		<input type="radio" id="verifycode-0" name="verifycode" {if $settings['verifycode'] == 0} checked="checked" {/if} value="0" />
		<label class="radio-inline" for="verifycode-0">
			否
		</label>
	</div>
</div>
<h5 class="page-header">版权信息</h5>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">是否显示首页</label>
	<div class="col-sm-8 form-control-static">
		<input type="radio" name="showhomepage" value="1" id="showhomepage_1" {if !empty($settings['showhomepage'])} checked{/if}>
		<label for="showhomepage_1" class="radio-inline"> 是</label>
		<input type="radio" name="showhomepage" value="0" id="showhomepage_2" {if empty($settings['showhomepage'])} checked{/if}>
		<label for="showhomepage_2" class="radio-inline"> 否</label>
		<div class="help-block">设置“否”后，打开地址时将直接跳转到登录页面，否则会跳转到首页。</div>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">网站名称</label>
	<div class="col-sm-8">
		<input type="text" name="sitename" class="form-control" value="{$settings['sitename']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">网站URL</label>
	<div class="col-sm-8">
		<input type="text" name="url" class="form-control" value="{$settings['url']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">keywords</label>
	<div class="col-sm-8">
		<input type="text" name="keywords" class="form-control" value="{$settings['keywords']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">description</label>
	<div class="col-sm-8">
		<input type="text" name="description" class="form-control" value="{$settings['description']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">左侧菜单定位</label>
	<div class="col-sm-8 form-control-static">
		<input type="radio" name="leftmenu_fixed" id="leftmenu_fixed_status-1" {if $settings['leftmenufixed'] == 1} checked="checked" {/if} value="1" />
		<label class="radio-inline" for="leftmenu_fixed_status-1">
			是
		</label>
		<input type="radio" name="leftmenu_fixed" id="leftmenu_fixed_status-0" {if $settings['leftmenufixed'] == 0} checked="checked" {/if} value="0" />
		<label class="radio-inline" for="leftmenu_fixed_status-0">
			否
		</label>
		<span class="help-block">选择“否”并保存后，左侧菜单随页面滚动而上下滚动</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">后台风格设置</label>
	<div class="col-sm-8">
		<select name="template" class="form-control">
			{loop $template $temp}
			<option value="{$temp}" {if $_W['setting']['basic']['template'] == $temp}selected{/if}>{$temp}</option>
			{/loop}
		</select>
		<span class="help-block">favorite icon</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">favorite icon</label>
	<div class="col-sm-8">
		{php echo tpl_form_field_image('icon', $settings['icon'], '', array('global' => true, 'extras' => array('image'=> ' width="32" ')));}
		<span class="help-block">favorite icon</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">前台LOGO</label>
	<div class="col-sm-8">
		{php echo tpl_form_field_image('flogo', $settings['flogo'], '', array('global' => true));}
		<span class="help-block">最佳尺寸：220px*50px</span>
		<span class="help-block">此logo是指首页及登录页面logo。</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">背景图片</label>
	<div class="col-sm-8">
		{php echo tpl_form_field_image('background_img', $settings['background_img'], '', array('global' => true));}
		<span class="help-block">此图片是指登录页面的背景图。</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">前台幻灯片</label>
	<div class="col-sm-8">
		{php echo tpl_form_field_multi_image('slides', $settings['slides'], '', array('global' => true, 'thumb' => 0));}
		<span class="help-block">设置首页幻灯片。</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">前台幻灯片显示文字</label>
	<div class="col-sm-8">
		<input type="text" class="form-control" name="notice" value="{$settings['notice']}"/>
		<span class="help-block">该文字显示在幻灯片上。</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">后台LOGO</label>
	<div class="col-sm-8">
		{php echo tpl_form_field_image('blogo', $settings['blogo'], '', $options = array('global' => true));}
		<span class="help-block">最佳尺寸：110px*35px</span>
		<span class="help-block">此logo是指登录后在本系统左上角显示的logo。</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2  control-label" style="text-align:left;">第三方统计代码</label>
	<div class="col-sm-8">
		<textarea style="height:150px;" class="form-control" cols="70" name="statcode" autocomplete="off">{$settings['statcode']}</textarea>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">底部右侧信息（上）</label>
	<div class="col-sm-8">
		<textarea style="height:150px;" class="form-control" cols="70" name="footerright" autocomplete="off">{$settings['footerright']}</textarea>
		<span class="help-block">自定义底部右侧信息，支持HTML</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">底部左侧信息（下）</label>
	<div class="col-sm-8">
		<textarea style="height:150px;" class="form-control" cols="70" name="footerleft" autocomplete="off">{$settings['footerleft']}</textarea>
		<span class="help-block">自定义底部左侧信息，支持HTML</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">联系人</label>
	<div class="col-sm-8">
		<input type="text" name="person" class="form-control" value="{$settings['person']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">联系电话</label>
	<div class="col-sm-8">
		<input type="text" name="phone" class="form-control" value="{$settings['phone']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">QQ</label>
	<div class="col-sm-8">
		<input type="text" name="qq" class="form-control" value="{$settings['qq']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">邮箱</label>
	<div class="col-sm-8">
		<input type="text" name="email" class="form-control" value="{$settings['email']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">公司名称</label>
	<div class="col-sm-8">
		<input type="text" name="company" value="{$settings['company']}"  class="form-control" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">关于我们</label>
	<div class="col-sm-8">
		{php echo tpl_ueditor('companyprofile', $settings['companyprofile']);}
		<span class="help-block">该文字显示在个人中心->关于我们中</span>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">详细地址</label>
	<div class="col-sm-8">
		<input type="text" name="address" value="{$settings['address']}"  class="form-control" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" style="text-align:left;">地理位置</label>
	<div class="col-sm-8">
		{php echo tpl_form_field_coordinate('baidumap', $settings['baidumap'])}
	</div>
</div>
<div class="form-group">
	<div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-1 col-xs-12 col-sm-10 col-md-10 col-lg-11">
		<input name="submit" type="submit" value="提交" class="btn btn-primary span3" />
		<input type="hidden" name="token" value="{$_W['token']}" />
	</div>
</div>
</form>
<script type="text/javascript">
	$("#form1").submit(function() {
		if ($("input[name='status']:checked").val() == 1) {
			if ($("textarea[name='reason']").val() == '') {
				util.message('请填写站点关闭原因');
				return false;
			}
		}
	});
	$("input[name='status']").click(function() {
		if ($(this).val() == 1) {
			$(".reason").show();
			var reason = $("input[name='reasons']").val();
			$("textarea[name='reason']").text(reason);
		} else {
			$(".reason").hide();
		}
	});
</script>
</div>
{template 'common/footer'}